import React, { Component } from 'react'

export default class State extends Component {

  state={
    count:1
  }

  render() {
    return (
      <div>
        <p>{this.state.count}</p>
        <button onClick={()=>{
          this.setState({
            count:this.state.count+1
          })
        }}>增加</button>
      </div>
    )
  }
}
